<template>
  <view>
    <view class="c-text-scroll">
      <view v-if="textScroll" class="uni-notice-bar-box">
        <uni-notice-bar color="#FFFFFF" background-color="#00000000" :show-icon="true" :speed="60" :scrollable="true" :single="true" :text="textScroll"></uni-notice-bar>
      </view>
    </view>
  </view>
</template>

<script>
import uniNoticeBar from '@/components/home/uni-notice-bar/uni-notice-bar.vue';
export default {
  name: 'c-text-scroll',
  components: {
    uniNoticeBar
  },
  props: {},
  data() {
    return {
      textScroll: ''
    };
  },
  methods: {
    async getNotices() {
      let res = await this.$api.home.getNotices();
      this.textScroll = res[0].remark;
    }
  },
  mounted() {
    this.getNotices();
  }
};
</script>

<style lang="scss" scoped>
.c-text-scroll {
  .uni-notice-bar-box {
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 1000upx;
  }
}
</style>
